package org.codesketch.flamingo



import grails.test.mixin.*
import org.junit.*

/**
 * See the API for {@link grails.test.mixin.services.ServiceUnitTestMixin} for usage instructions
 */
@TestFor(NodeService)
class NodeServiceTests {

    void testSomething() {
		String s = "0x7fea4fcb0580 1303835108.618863 131G req.http.host ~ www.myhost.com && req.url ~ /some/url"
//		String[] p = s.split("[(?<!~)\\s]");
//		String[] p = s.split("(?<![~&])\\s(?![~&])");
//		System.out.println(p.lenght);
//        fail "Implement me"
    }
	
	void testGetParameter() {
		String s = 'cc_command                 "exec cc -fpic -shared -Wl,-x -o %o %s"';
		String s1 = 'http_headers               64 [header lines]'
		String[] p = s1.split("\\s+(?=[\\s\"\\[\\(])")
		for(int i=0; i<p.length; i++) {
			System.out.println(p[i].trim());
		}
	}
}
